﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TestForce : MonoBehaviour {

    public Rigidbody2D body;

	// Use this for initialization
	void Start () 
    {
        body = GetComponent<Rigidbody2D>();
	}
	
	// Update is called once per frame
	void Update () 
    {
	    if(Input.GetKey(KeyCode.A))
        {
            body.AddForce(new Vector2(-1.0f, 0.0f));
        }
        if (Input.GetKey(KeyCode.D))
        {
            body.AddForce(new Vector2(1.0f, 0.0f));
        }
	}
}
